package topo.action;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JList;
import topo.MainFrame;
import topo.dialog.AutoDiscoverByIpDialog;
import topo.utils.DialogTools;

public class AutoDiscoverByIpAction extends AbstractAction {
    public AutoDiscoverByIpAction() {
        super("按IP范围搜索设备");
    }

    public void actionPerformed(ActionEvent e) {
        MainFrame.sourceCodeList.setSelectedValue(getValue("Name"), true);

        AutoDiscoverByIpDialog dialog = new AutoDiscoverByIpDialog(MainFrame.frame);
        DialogTools.dialogPack(MainFrame.frame, dialog);
    }
}